// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * CatalogProductOptionTypeValue generated by hbm2java
 */
@Entity
@Table(name = "catalog_product_option_type_value", catalog = "magento")
public class CatalogProductOptionTypeValue implements java.io.Serializable {

	private Integer optionTypeId;
	private CatalogProductOption catalogProductOption;
	private String sku;
	private int sortOrder;
	private Set catalogProductOptionTypeTitles = new HashSet(0);
	private Set catalogProductOptionTypePrices = new HashSet(0);

	public CatalogProductOptionTypeValue() {
	}

	public CatalogProductOptionTypeValue(
			CatalogProductOption catalogProductOption, int sortOrder) {
		this.catalogProductOption = catalogProductOption;
		this.sortOrder = sortOrder;
	}

	public CatalogProductOptionTypeValue(
			CatalogProductOption catalogProductOption, String sku,
			int sortOrder, Set catalogProductOptionTypeTitles,
			Set catalogProductOptionTypePrices) {
		this.catalogProductOption = catalogProductOption;
		this.sku = sku;
		this.sortOrder = sortOrder;
		this.catalogProductOptionTypeTitles = catalogProductOptionTypeTitles;
		this.catalogProductOptionTypePrices = catalogProductOptionTypePrices;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "option_type_id", unique = true, nullable = false)
	public Integer getOptionTypeId() {
		return this.optionTypeId;
	}

	public void setOptionTypeId(Integer optionTypeId) {
		this.optionTypeId = optionTypeId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "option_id", nullable = false)
	public CatalogProductOption getCatalogProductOption() {
		return this.catalogProductOption;
	}

	public void setCatalogProductOption(
			CatalogProductOption catalogProductOption) {
		this.catalogProductOption = catalogProductOption;
	}

	@Column(name = "sku", length = 64)
	public String getSku() {
		return this.sku;
	}

	public void setSku(String sku) {
		this.sku = sku;
	}

	@Column(name = "sort_order", nullable = false)
	public int getSortOrder() {
		return this.sortOrder;
	}

	public void setSortOrder(int sortOrder) {
		this.sortOrder = sortOrder;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "catalogProductOptionTypeValue")
	public Set getCatalogProductOptionTypeTitles() {
		return this.catalogProductOptionTypeTitles;
	}

	public void setCatalogProductOptionTypeTitles(
			Set catalogProductOptionTypeTitles) {
		this.catalogProductOptionTypeTitles = catalogProductOptionTypeTitles;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "catalogProductOptionTypeValue")
	public Set getCatalogProductOptionTypePrices() {
		return this.catalogProductOptionTypePrices;
	}

	public void setCatalogProductOptionTypePrices(
			Set catalogProductOptionTypePrices) {
		this.catalogProductOptionTypePrices = catalogProductOptionTypePrices;
	}

}
